﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VisualPoint.Controls.Actions;
using VisualPoint.Controls.ViewModels;

namespace VisualPoint.Controls.Views
{
    /// <summary>
    /// Interaction logic for ActionListControl.xaml
    /// </summary>
    public partial class ActionListControl : UserControl
    {
        public ActionListControl()
        {
            InitializeComponent();

            CreateViewModel();
        }

        private ActionListViewModel _viewModel;
        public ActionListViewModel ViewModel
        {
            get
            {
                return _viewModel;
            }
        }

        private void CreateViewModel()
        {
            _viewModel = new ActionListViewModel();
            DataContext = _viewModel;
        }


        public void SlideSelectionChange(Microsoft.Office.Interop.PowerPoint.Slide slide)
        {
            ViewModel.SlideSelectionChange(slide);
        }

        public void RunActions(Microsoft.Office.Interop.PowerPoint.Slide slide, ActionTime actionTime)
        {
            ViewModel.RunActions(slide, actionTime);
        }



        internal void BeforeSave()
        {
            ViewModel.BeforeSave();
        }
    }
}
